class Solution {
public:
    int sumOddLengthSubarrays(vector<int>& arr) {
int m=0;
        for(int i=0;i<arr.size();++i){
            int sum=0;
            int len=0;
            for(int j=i;j<arr.size();++j){
                len++;
                sum=sum+arr[j];
                if(len%2==1) m=m+sum;
            }
        }
        return m;
    }
};